
<!--
/**************************************************
* @(#)ordercancel.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006/02/16, RoadZheng
*  1) first release
/**************************************************
-->
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="java.util.*"%>
<%@ include file="../../common.jsp" %>
<%
			response.setHeader("Pragma", "No-cache");
			response.setHeader("Cache-Control", "no-cache,no-store,max-age=0");
			response.setDateHeader("Expires", 0);
%>
<html>
<head>
<title>订单管理</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/css.css" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/calendar.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/string.js"></SCRIPT>
<SCRIPT  language="JavaScript">
function query() {
    if(document.form1.order_tempid.value.length <1) {
       alert("订单编号输入不能为空!");
       document.form1.order_tempid.focus();
       return ;
    }
	document.form1.action='<%=response.encodeURL(root+"/A150702.do")%>';
    form1.submit();
}
function dingdanquxiao() {
    document.form2.action='<%=response.encodeURL(root+"/A150703.do")%>';
    form2.submit();
}
function fanhui() {
    document.form2.action='<%=response.encodeURL(root+"/A150701.do")%>';
    form2.submit();
}
</SCRIPT>
</head>
  
<body   BGCOLOR=#f2f2f2 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
	<p><br></p>
	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	  <tr>
	    <td height="20"> 
	      <table width="100%" border="0" cellspacing="0" cellpadding="1">
	        <tr height="20">
	          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
	          <td height="30" width="758" class="mtxt_black">订单取消</td>
	        </tr>
	      </table>
	    </td>
	  </tr>
	  <tr>
	    <td class="bg_line" height="2"></td>
	  </tr>
	</table>
	<br>
	<!---------------------------------------订单查询-------------------------------------------------------->
	<form name="form1" id="form1" method="post"  style="visibility: visible;">
	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	    <tr> 
	        <td> 
	            <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
	                <tbody> 
	                <tr class="bg_row_odd" height=20> 
	                	<td class=top align=middle width='10%' id='aaa'>
	                	    <div align="center" class="txt_content">订单编号</div>
	                	</td>
	                    <td class=top align=middle id='bbb'> 
	                        <div align="left" class="txt_content"> 
							<input type='text' id='order_tempid' name='order_tempid' size='18' maxlength='9'>
							</div>
	                    </td>
	                </tr>
	                </tbody> 
	            </table>
	        </td>
	    </tr>
	  </table>
	  <br>
	  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	    <tr>
	       <td>
	         <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
		    	<tr>
		    		<td width=60% align=center>
		    			<input type="image" src="<%=response.encodeURL(root+"/images/button/chaxun.gif")%>" width="58" height="24" class="box" onclick="query();return false;">
		    		</td>		    		
		    	<tr>
		    </table>
	       </td>
	    </tr>
	</table>	
	</form>
	<!---------------------------------------订单查询-------------------------------------------------------->
	
	<!---------------------------------------显示订单基本信息-------------------------------------------------------->
	<%String[] tOrderInfo = (String[])request.getAttribute("orderinfo"); 
	  if(tOrderInfo != null && tOrderInfo[0] != null && tOrderInfo[0].length() > 0) {%>
	<form name="form2" method="post">
	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	    <tr> 
	        <td> 
	            <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
	                <tbody> 
	                <tr class="bg_column" height=20> 
                    	<td align=right colspan="11" nowrap>
                    	  待取消订单总体信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	  订单状态:<%=tOrderInfo[1]%>&nbsp;&nbsp;&nbsp;&nbsp;
                    	</td>
	                </tr>
	                <tr class="bg_row_odd" height=20> 
	                	<td class=top align=middle width='20%' id='aaa'>
	                	    <div align="center" class="txt_content">订单编号</div>
	                	</td>
	                    <td class=top align=middle id='bbb'> 
	                        <div align="left" class="txt_content">&nbsp;&nbsp;<%=tOrderInfo[0]%></div>
	                        <input type='hidden' name='order_tempid' value='<%=tOrderInfo[0]%>'>
	                    </td>
	                    <td class=top align=middle width='20%'> 
	                        <div align="center" class="txt_content">订单种类</div>
	                    </td>
	                    <td class=top align=middle> 
	                        <div align="left" class="txt_content">&nbsp;&nbsp;<%=tOrderInfo[2]%></div>
	                    </td>
	                </tr>
	                <tr class="bg_row_odd" height=60> 
	                    <td class=top align=middle> 
	                        <div align="center" class="txt_content">备注</div>
	                    </td>
	                    <td class=top align=middle colspan='3'>&nbsp;&nbsp;<%=tOrderInfo[3]%></td>
	                </tr>	                
	                </tbody> 
	            </table>
	        </td>
	    </tr>
	</table>
	<!---------------------------------------显示订单基本信息-------------------------------------------------------->
	
	<!---------------------------------------显示订单详细信息-------------------------------------------------------->
	<center>

	<div style="height:180;width:90%;overflow:auto;text-align:center;">
	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
            <td>
                <table class=bg_table id=tableId cellspacing=1 cellpadding=2 border=0 width="90%"  align="center">
                    <tbody> 
                    <tr class="bg_column" height=20> 
                    	<td align=middle colspan="15">订单产品输入</td>
	                </tr>
	                <tr class="bg_column" height=20> 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>产品编号</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>产品名称</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>产品单价</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>订货数量</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>产品总价</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>送货日期</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>送货时间</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>订货单位</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>送货地址</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>订货联系人</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>订货联系电话</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>配送方式</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>结算方式</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content" nowrap>供应商</div>
                        </td>
                      </tr>
                      <%ArrayList tOrderDetails = (ArrayList)request.getAttribute("orderdetails");
                        String tBgRow = "";
                        GSOrderMan4QueryVO tGSOrderMan4QueryVO = null;
                        double tOrderCount;
                        double tTotalPrice;
                        String tManufactureId ;
                        String tConcentricityId ;
    					String tManufactureName;
    					double tManufactureUnitPrice;
					    String tOrderCountString;
					    String tDeliverDate;
					    String tDeliverTime;
					    String tDeptId;
					    String tOrderDeptName;
					    String tDeliverAddr;
					    String tLinkMan;
					    String tLinkTel;
					    String tDeliverMode;
					    String tBalanceMode;
					    String tProviderName;
                        if(tOrderDetails != null && tOrderDetails.size() > 0) {
                          for(int i=0;i<tOrderDetails.size();i++) {
                            tBgRow = (i%2 == 0)?"class=bg_row_odd":"class=bg_row_even";
                            tGSOrderMan4QueryVO = (GSOrderMan4QueryVO)tOrderDetails.get(i);%>
					  <tr <%=tBgRow%> height=20> 
                        <td class=top align=middle  nowrap> 
                            <%tConcentricityId = tGSOrderMan4QueryVO.concentricityId;
                              if(tConcentricityId == null) tConcentricityId="";%>
                            <div align="center" class="txt_content"><%=tConcentricityId%></div>
                        </td>
                        <!-- 
                        <td class=top align=middle  nowrap> 
                            <%tManufactureId = tGSOrderMan4QueryVO.manufactureid;
                              if(tManufactureId == null) tManufactureId="";%>
                            <div align="center" class="txt_content"><%=tManufactureId%></div>
                        </td>
                        -->
                        <td class=top align=middle nowrap>
                            <%tManufactureName = tGSOrderMan4QueryVO.manufactureName;
                              if(tManufactureName == null) tManufactureName = "";%> 
                            <div align="center" class="txt_content"><%=tManufactureName%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tManufactureUnitPrice = tGSOrderMan4QueryVO.manufactureUnitPrice;%>
                            <div align="center" class="txt_content"><%=tManufactureUnitPrice%></div>
                        </td>
                        <td class=top align=middle nowrap>
                            <%tOrderCountString = tGSOrderMan4QueryVO.ordercount;
                              if(tOrderCountString == null) tOrderCountString = "";%> 
                            <div align="center" class="txt_content"><%=tOrderCountString%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tOrderCount = Double.parseDouble(tGSOrderMan4QueryVO.ordercount);
                              tTotalPrice = tOrderCount * tManufactureUnitPrice; %>
                            <div align="center" class="txt_content"><%=tTotalPrice%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tDeliverDate = tGSOrderMan4QueryVO.deliverdate;
                              if(tDeliverDate == null) tDeliverDate = "";%>
                            <div align="center" class="txt_content"><%=tDeliverDate%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tDeliverTime = tGSOrderMan4QueryVO.delivertime;
                              if(tDeliverTime == null) tDeliverTime = "";%>
                            <div align="center" class="txt_content"><%=tDeliverTime%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                           <%tOrderDeptName = tGSOrderMan4QueryVO.orderDeptName;
                             if(tOrderDeptName == null) tOrderDeptName = "";%>
                            <div align="center" class="txt_content"><%=tOrderDeptName%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tDeliverAddr = tGSOrderMan4QueryVO.deliveraddr;
                              if(tDeliverAddr == null) tDeliverAddr = "";%>
                            <div align="center" class="txt_content"><%=tDeliverAddr%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tLinkMan = tGSOrderMan4QueryVO.linkman;
                              if(tLinkMan == null) tLinkMan = "";%>
                            <div align="center" class="txt_content"><%=tLinkMan%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tLinkTel = tGSOrderMan4QueryVO.linktel;
                              if(tLinkTel == null) tLinkTel = "";%>
                            <div align="center" class="txt_content"><%=tLinkTel%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tDeliverMode = tGSOrderMan4QueryVO.delivermode;
                              if(tDeliverMode == null) tDeliverMode = "";%>
                            <div align="center" class="txt_content"><%=tDeliverMode%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tBalanceMode = tGSOrderMan4QueryVO.balancemode;
                              if(tBalanceMode == null) tBalanceMode = "";%>
                            <div align="center" class="txt_content"><%=tBalanceMode%></div>
                        </td>
                        <td class=top align=middle nowrap> 
                            <%tProviderName = tGSOrderMan4QueryVO.providerName;
                              if(tProviderName == null) tProviderName = "";%>
                            <div align="center" class="txt_content"><%=tProviderName%></div>
                        </td>
                        <% } }%>
                      </tr>
                    </tbody> 
                </table>
            </td>
        </tr>
    </table>
    </form>
    </div>
    <!---------------------------------------显示订单详细信息-------------------------------------------------------->
    <br>
    <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
	    <%if(tOrderInfo[4] != null && tOrderInfo[4].equals("1")) {%>
		<td width=50% align=middle>
			<input type="image" src="<%=response.encodeURL(root+"/images/button/dingdanquxiao.gif")%>" width="86" height="24" class="box" onclick="dingdanquxiao();return false;">
		</td>
		<% }%>
		<td width=50% align=middle>
			<input type="image" src="<%=response.encodeURL(root+"/images/button/fanhui.gif")%>" width="58" height="24" class="box" onclick="fanhui();return false;">
		</td>
	<tr>
    </table>
    <%}%>
    
    
    
  </body>
</html>
